home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / amos / ldosv25d.lha / ldos_demo / examples / ldos / View-Boot.AMOS / View-Boot.amosSourceCode
AMOS Source Code  |  1992-03-22  |  1KB  |  43 lines

  1. 'Display the contents of the boot-blocks (block 0 and 1) 
  2. Screen Open 1,640,256,2,Hires
  3. Paper 0 : Clw : Ink 0,1 : Curs Off 
  4. Reserve As Chip Work 10,1024
  5. Rem NOTE   CHIP!!
  6. 'Read the boot-block 
  7. A= Extension_10_01AE("trackdisk.device",0,0)
  8. A= Extension_10_01DA(2,Start(10),512*2,880*512)
  9. '
  10. 'Turn off motor  
  11. A= Extension_10_01DA(9,0,0,0)
  12.  Extension_10_01C6 
  13. X=0 : Y=10
  14. T=Timer
  15. For I=Start(10) To Start(10)+1023
  16.    P=Peek(I)
  17.    Text X,Y,Chr$(P)
  18.    X=X+8
  19.    If X=64*8
  20.       X=0
  21.       Y=Y+10
  22.    End If 
  23. Next I
  24. _TOOK=Timer-T
  25. Locate 20,21 : Print "Contents of block 0 and 1"
  26. Print "This was the speed of AMOS, Chr$()"
  27. Print "Press a Key" : Wait Key 
  28. Clw 
  29. Y=10
  30. ST=Start(10)
  31. T=Timer
  32. For I=1 To 16
  33.    A$= Extension_10_007A(ST,64)
  34.    ST=ST+64
  35.    Text 0,Y,A$
  36.    Y=Y+10
  37. Next I
  38. _TOK=Timer-T
  39. Locate 20,21 : Print "Contents of block 0 and 1"
  40. Print "This is the speed of Ldos, Lstr()"
  41. Print "Chr$ took";_TOOK;" Vbl  Lstr took";_TOK;" Vbl"
  42. Print "Which means, Lstr is more than ";_TOOK/_TOK;" times faster :-)"
  43. Wait 100